<%--
 *  File:    VisitPlanTempetHeader.jsp
 *  @Author: tendyhu
 *  Date:    2009-9-28 ??06:11:02

 *  Copyright (C) 2000 - 2009 Oval Technologies, Inc.
 *  All rights reserved. 
 *
 *  This software is the confidential and proprietary information of Oval 
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>
<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>
<%@ page import="com.oval.util.*" %>

<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>
<%
  	Category cat = Category.getInstance("jsp.VisitPlanTempetHeader");
%>
<%
	String strModuleName = "CRM";
  	String privilegeCode = "H0254";
%>
<%
  String orgid="";
    if(request.getParameter("orgid")!=null)
    	orgid=	request.getParameter("orgid");
    if((	orgid==null || orgid.trim().length()==0)&& session.getAttribute("orgid")!=null)
    {
    	orgid= session.getAttribute("orgid").toString();
    	session.removeAttribute("orgid");
    }
    String contactid="";
    if(null!=request.getParameter("contactid")){    	
    	contactid=(String)request.getParameter("contactid");
    }
    if ((contactid==null || contactid.trim().length()==0) && session.getAttribute("contactid")!=null)
    {
    	contactid=((Integer)(session.getAttribute("contactid"))).toString();
    	session.removeAttribute("contactid");
    }
    String visitplantempletid="";
    if(request.getParameter("visitplantempletid")!=null)
    	visitplantempletid=	request.getParameter("visitplantempletid");
    if((	visitplantempletid==null || visitplantempletid.trim().length()==0)&& session.getAttribute("visitplantempletid")!=null)
    {
    	visitplantempletid= session.getAttribute("visitplantempletid").toString();
    	session.removeAttribute("visitplantempletid");
    }
    String displayflag="";
    if(request.getParameter("displayflag")!=null)
    	displayflag=	request.getParameter("displayflag");
    if((	displayflag==null || displayflag.trim().length()==0)&& session.getAttribute("displayflag")!=null)
    {
    	displayflag= session.getAttribute("displayflag").toString();
    	session.removeAttribute("displayflag");
    }
 %>

<%@ include file="/inc/Security.inc" %>
<%@ include file="/inc/PageDefault.inc" %>
<%@ include file="/inc/FrmDefault.inc" %>
<html>
<head>
<title>VisitPlanTempetHeader</title>


<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="javascript">
function page_none()
{
    alert('<%=message.getMessageDesc("SAVE_INFO_FIRST")%>');
    return;
}

function clicked(obj){
var type=obj.id;
<%if(visitplantempletid!=null&& visitplantempletid.trim().length()>0 ){%>
        if (type == "A01") {
               parent.down.location.href="VisitPlanTempetMain.jsp?contactid=<%=JspHelper.filterNull(contactid)%>&orgid=<%=JspHelper.filterNull(orgid)%>&visitplantempletid=<%=JspHelper.filterNull(visitplantempletid)%>&displayflag=<%=JspHelper.filterNull(displayflag)%>&<%= OvalTools.randomURL() %>";
        }else if (type == "A02"){
               parent.down.location.href="VisitPlanTempletDetail.jsp?contactid=<%=JspHelper.filterNull(contactid)%>&orgid=<%=JspHelper.filterNull(orgid)%>&visitplantempletid=<%=JspHelper.filterNull(visitplantempletid)%>&displayflag=<%=JspHelper.filterNull(displayflag)%>&<%= OvalTools.randomURL() %>";
        }
    <%}else {%>
        page_none();        
    <%}%>
}
</script>

</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
 

<table width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top" height="15">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td class="summary_top" ></td>
        </tr>
      </table>
    </td>
  </tr>


  <tr>
    <td>
        <%
            Vector vec = new Vector();
            HashMap tabHash = new HashMap();
            tabHash.put("id","A01");
            tabHash.put("label","L_BasicInfo");
            vec.add(new HashMap(tabHash));

            tabHash.put("id","A02");
            tabHash.put("label","L_Detail");
            vec.add(new HashMap(tabHash));

        %>
       <custom:tab  vecAttr="<%=vec%>" defaultID="A01" />

    </td>
  </tr>


</table>
</form>
</body>
</html>